using Google.ProtocolBuffers;
using Google.ProtocolBuffers.Collections;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class QQGroupList : GeneratedMessageLite<QQGroupList, QQGroupList.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<QQGroupList, QQGroupList.Builder>
		{
			private bool resultIsReadOnly;
			private QQGroupList result;
			protected override QQGroupList.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override QQGroupList MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override QQGroupList DefaultInstanceForType
			{
				get
				{
					return QQGroupList.DefaultInstance;
				}
			}
			public uint Count
			{
				get
				{
					return this.result.Count;
				}
				set
				{
					this.SetCount(value);
				}
			}
			public IPopsicleList<QQGroup> QQGroupsList
			{
				get
				{
					return this.PrepareBuilder().qQGroups_;
				}
			}
			public int QQGroupsCount
			{
				get
				{
					return this.result.QQGroupsCount;
				}
			}
			public Builder()
			{
				this.result = QQGroupList.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(QQGroupList cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private QQGroupList PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					QQGroupList other = this.result;
					this.result = new QQGroupList();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override QQGroupList.Builder Clear()
			{
				this.result = QQGroupList.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override QQGroupList.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new QQGroupList.Builder(this.result);
				}
				return new QQGroupList.Builder().MergeFrom(this.result);
			}
			public override QQGroupList BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override QQGroupList.Builder MergeFrom(IMessageLite other)
			{
				if (other is QQGroupList)
				{
					return this.MergeFrom((QQGroupList)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override QQGroupList.Builder MergeFrom(QQGroupList other)
			{
				return this;
			}
			public override QQGroupList.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override QQGroupList.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(QQGroupList._qQGroupListFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = QQGroupList._qQGroupListFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 8u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							input.ReadMessageArray<QQGroup>(num, text, this.result.qQGroups_, QQGroup.DefaultInstance, extensionRegistry);
						}
					}
					else
					{
						this.result.hasCount = input.ReadUInt32(ref this.result.count_);
					}
				}
				return this;
			}
			public QQGroupList.Builder SetCount(uint value)
			{
				this.PrepareBuilder();
				this.result.hasCount = true;
				this.result.count_ = value;
				return this;
			}
			public QQGroupList.Builder ClearCount()
			{
				this.PrepareBuilder();
				this.result.hasCount = false;
				this.result.count_ = 0u;
				return this;
			}
			public QQGroup GetQQGroups(int index)
			{
				return this.result.GetQQGroups(index);
			}
			public QQGroupList.Builder SetQQGroups(int index, QQGroup value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.qQGroups_[index] = value;
				return this;
			}
			public QQGroupList.Builder SetQQGroups(int index, QQGroup.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.qQGroups_[index] = builderForValue.Build();
				return this;
			}
			public QQGroupList.Builder AddQQGroups(QQGroup value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.qQGroups_.Add(value);
				return this;
			}
			public QQGroupList.Builder AddQQGroups(QQGroup.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.qQGroups_.Add(builderForValue.Build());
				return this;
			}
			public QQGroupList.Builder AddRangeQQGroups(IEnumerable<QQGroup> values)
			{
				this.PrepareBuilder();
				this.result.qQGroups_.Add(values);
				return this;
			}
			public QQGroupList.Builder ClearQQGroups()
			{
				this.PrepareBuilder();
				this.result.qQGroups_.Clear();
				return this;
			}
		}
		public const int CountFieldNumber = 1;
		public const int QQGroupsFieldNumber = 2;
		private static readonly QQGroupList defaultInstance;
		private static readonly string[] _qQGroupListFieldNames;
		private static readonly uint[] _qQGroupListFieldTags;
		private bool hasCount;
		private uint count_;
		private PopsicleList<QQGroup> qQGroups_ = new PopsicleList<QQGroup>();
		private int memoizedSerializedSize = -1;
		public static QQGroupList DefaultInstance
		{
			get
			{
				return QQGroupList.defaultInstance;
			}
		}
		public override QQGroupList DefaultInstanceForType
		{
			get
			{
				return QQGroupList.DefaultInstance;
			}
		}
		protected override QQGroupList ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint Count
		{
			get
			{
				return this.count_;
			}
		}
		public IList<QQGroup> QQGroupsList
		{
			get
			{
				return this.qQGroups_;
			}
		}
		public int QQGroupsCount
		{
			get
			{
				return this.qQGroups_.Count;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				if (!this.hasCount)
				{
					return false;
				}
				bool result;
				using (IEnumerator<QQGroup> enumerator = this.QQGroupsList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						QQGroup current = enumerator.get_Current();
						if (!current.IsInitialized)
						{
							result = false;
							return result;
						}
					}
					return true;
				}
				return result;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasCount)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.Count);
				}
				using (IEnumerator<QQGroup> enumerator = this.QQGroupsList.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						QQGroup current = enumerator.get_Current();
						num += CodedOutputStream.ComputeMessageSize(2, current);
					}
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private QQGroupList()
		{
		}
		public QQGroup GetQQGroups(int index)
		{
			return this.qQGroups_[index];
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] qQGroupListFieldNames = QQGroupList._qQGroupListFieldNames;
			if (this.hasCount)
			{
				output.WriteUInt32(1, qQGroupListFieldNames[0], this.Count);
			}
			if (this.qQGroups_.Count > 0)
			{
				output.WriteMessageArray<QQGroup>(2, qQGroupListFieldNames[1], this.qQGroups_);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasCount)
			{
				num ^= this.count_.GetHashCode();
			}
			using (IEnumerator<QQGroup> enumerator = this.qQGroups_.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					QQGroup current = enumerator.get_Current();
					num ^= current.GetHashCode();
				}
			}
			return num;
		}
		public override bool Equals(object value)
		{
			QQGroupList qQGroupList = value as QQGroupList;
			if (qQGroupList == null)
			{
				return false;
			}
			if (this.hasCount != qQGroupList.hasCount || (this.hasCount && !this.count_.Equals(qQGroupList.count_)))
			{
				return false;
			}
			if (this.qQGroups_.Count != qQGroupList.qQGroups_.Count)
			{
				return false;
			}
			for (int i = 0; i < this.qQGroups_.Count; i++)
			{
				if (!this.qQGroups_[i].Equals(qQGroupList.qQGroups_[i]))
				{
					return false;
				}
			}
			return true;
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<QQGroupList, QQGroupList.Builder>.PrintField("Count", this.hasCount, this.count_, writer);
			GeneratedMessageLite<QQGroupList, QQGroupList.Builder>.PrintField<QQGroup>("QQGroups", this.qQGroups_, writer);
		}
		public static QQGroupList ParseFrom(byte[] data)
		{
			return QQGroupList.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private QQGroupList MakeReadOnly()
		{
			this.qQGroups_.MakeReadOnly();
			return this;
		}
		public static QQGroupList.Builder CreateBuilder()
		{
			return new QQGroupList.Builder();
		}
		public override QQGroupList.Builder ToBuilder()
		{
			return QQGroupList.CreateBuilder(this);
		}
		public override QQGroupList.Builder CreateBuilderForType()
		{
			return new QQGroupList.Builder();
		}
		public static QQGroupList.Builder CreateBuilder(QQGroupList prototype)
		{
			return new QQGroupList.Builder(prototype);
		}
		static QQGroupList()
		{
			QQGroupList.defaultInstance = new QQGroupList().MakeReadOnly();
			QQGroupList._qQGroupListFieldNames = new string[]
			{
				"Count",
				"QQGroups"
			};
			QQGroupList._qQGroupListFieldTags = new uint[]
			{
				8u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.QQGroupList.Descriptor, null);
		}
	}
}
